The present invention relates to a method for seeking a three-dimensional vector in a three-dimensional feature space, that is, a method for seeking a three-dimensional vector indicating the distribution of features in a three-dimensional space when the features are linearly distributed. More particularly, the present invention relates to a three-dimensional vector extracting method suitable for extracting, from an object region of a color image plotted in a space of three primary colors, a color vector used for the color changing of the object region, that is, a color vector of at least one of a specular reflection vector of the object, a diffuse reflection vector of the object and an ambient vector.
The reference "The Measurement of Highlights in Color Images" reported by G. K. Klinker et al. in International Journal of Computer Vision, No. 1, Vol. 2, pp. 7-32 (1988.6) discloses a method which is related the method of the present invention.
Statistical methods as well as analytical methods such as principal component analysis and clustering have hitherto been used as methods for seeking the distribution of features in a feature space. Among these methods, it is most customary to use the method of principal component analysis so as to seek the axes of the principal components when there is a correlation between the components of the features.
In the case of the principal component analysis, it is necessary to divide the features into a plurality of groups prior to the analysis when there are a plurality of groups of correlated features in the feature space.
In the reference cited above, the method of principal component analysis is used to seek, from a three-dimensional feature space, vectors indicating linearly clustering correlated features. That is, in the reference, a plurality of vectors are extracted on the basis of the values of pixels of an object region in a color image plotted in a space of three primary colors. It is assumed that the extracted vectors are connected together at about their start and end points and that the directions of the vectors to be linked are not the same directions, and that the values of all of the vector components are positive. The clustering and plotted points exist in the vicinity of these vectors. In the reference, the vectors are extracted in a manner which will be described below by reference to FIG. 6.
First, plotted points are classified. For this purpose, a vector is roughly extracted from a distribution 60 of pixel values in an object region as shown in FIG. 6. A point 61 nearest to the origin of an RGB coordinate system and a point 62 remotest from the origin are extracted, and these two points 61 and 62 are connected by a line segment 63. Then, a point 65 is detected where the distance 64 between that point and the line segment 63 is a maximum. When the value of this distance 64 is larger than a predetermined threshold value, the segment 63 is divided, and the point 65 is selected as a start point and an end point respectively of new segments 66 and 67. Then, the segments 66 and 67 are processed in a manner similar to the processing for the segment 63. The above manner of segment division is repeated until the segment 63 can be finally divided into a plurality of segments, thereby extracting vectors.
The classification of the plotted points is such that the distance between each of the individual points and each of the individual segments is detected, and each of the individual points is decided to belong to the nearest segment group.
After the classification of the plotted points, the principal component analysis is made for each of the groups, and the axis of the principal component in each group is taken as a vector, thereby determining an accurate three-dimensional vector.
The method of principal component analysis used in the reference is excellent in that the number of dimensions need not be limited, and a highly reliable three-dimensional vector reflecting the feature distribution can be obtained when pre-processing for removing, for example, noise is carried out prior to the analysis. However, the method of principal component analysis used in the reference is defective in the points enumerated below.
Firstly, when there are a plurality of groups of correlated features in a feature space, it is necessary to carry out, before execution of the principal component analysis, a step of pre-processing for classifying the plotted points in the feature space. This manner of pre-processing in the reference is applicable only when the assumption referred to in the description of the reference is valid with respect to the distribution of features. Thus, the above manner of pre-processing is not universally applicable but differs depending on the distribution of features of an object. Therefore, it is necessary to choose the manner of pre-processing according to the object of vector extraction.
Secondly, because an aggregate of numerical data is handled, the result of the pre-processing and also the result of vector or line extraction are generally provided in the form of numerical data, and it becomes necessary to verify these results. Therefore, it is necessary to provide a method for verifying the suitability or validity of both the pre-processing and the extracted vectors or extracted lines. At the same time, a step of processing for executing the verification also becomes necessary.
Thirdly, the principal component analysis requires vast steps of computations.